package com.lmc.orderservice.controller;

import com.lmc.orderservice.api.ProductApi;
import com.lmc.product.model.ProductInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("order123")
public class FeignController {
    @Autowired
    private ProductApi productApi;

    @RequestMapping("getProductInfo")
    public ProductInfo getProductInfo(@RequestParam("productId") Long productId){
        return productApi.getProductInfo(productId);
    }
}
